package utile

type CandidateHexQueue []*CandidateHex

type CandidateHex struct {
	NodeId               string
	BlsPubKey            string
	StakingAddress       string
	BenefitAddress       string
	RewardPer            uint16
	NextRewardPer        uint16
	RewardPerChangeEpoch uint32
	StakingTxIndex       uint32
	ProgramVersion       uint32
	Status               CandidateStatus
	StakingEpoch         uint32
	StakingBlockNum      uint64
	Shares               string
	Released             string
	ReleasedHes          string
	RestrictingPlan      string
	RestrictingPlanHes   string
	DelegateEpoch        uint32
	DelegateTotal        string
	DelegateTotalHes     string
	DelegateRewardTotal  string
	Description
}

type CandidateStatus uint32

type Description struct {
	// External Id for the third party to pull the node description (with length limit)
	ExternalId string
	// The Candidate Node's Name  (with a length limit)
	NodeName string
	// The third-party home page of the node (with a length limit)
	Website string
	// Description of the node (with a length limit)
	Details string
}

type ValidatorExQueue []*ValidatorEx

type ValidatorEx struct {
	//NodeAddress common.Address
	NodeId string
	// bls public key
	BlsPubKey string
	// The account used to initiate the staking
	StakingAddress string
	// The account receive the block rewards and the staking rewards
	BenefitAddress string
	// Delegate reward amount percent for current settlement cycle
	RewardPer uint16
	// Delegate reward amount percent for next settlement cycle
	NextRewardPer uint16
	// Number of settlement cycles when changing the commission reward percentage
	RewardPerChangeEpoch uint32
	// The tx index at the time of staking
	StakingTxIndex uint32
	// The version of the node process
	ProgramVersion uint32
	// Block height at the time of staking
	StakingBlockNum uint64
	// All vons of staking and delegated
	//Shares *big.Int
	Shares string
	// Node desc
	Description
	// this is the term of validator in consensus round
	// [0, N]
	ValidatorTerm uint32
	// Effective total delegate
	DelegateTotal string

	DelegateRewardTotal string
}

type DelRelatedQueue []*DelegateRelated
type DelegateRelated struct {
	Addr            string
	NodeId          string
	StakingBlockNum uint64
}
